﻿//-----------------------------------------------------------------------------------
// <copyright file="UnitTestMethodInvokerResult.cs" company="P.O.S Informatique">
//     Copyright (c) P.O.S Informatique. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------------------
namespace PosInformatique.DevelopmentTools.VisualStudio.TestExtensions
{
    using System;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// Represents the result of the invocation of the unit test method
    /// by the <see cref="UnitTestMethodInvoker"/>.
    /// </summary>
    [Serializable]
    internal sealed class UnitTestMethodInvokerResult
    {
        /// <summary>
        /// The exception occurred during the unit test.
        /// </summary>
        private readonly Exception exception;

        /// <summary>
        /// Initializes a new instance of the <see cref="UnitTestMethodInvokerResult"/> class
        /// with the specified occurred exception.
        /// </summary>
        /// <param name="exception">Exception thrown by the unit test.</param>
        public UnitTestMethodInvokerResult(Exception exception)
        {
            this.exception = exception;
        }

        /// <summary>
        /// Gets the exception occurred during the unit test.
        /// </summary>
        public Exception Exception
        {
            get { return this.exception; }
        }
    }
}
